﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Diagnostics;

namespace HPCERP.Service
{
    public static class LogMessage
    {
        private const string appName = "HPCERP.Service";
        public static void WriteMessage(string message)
        {
            EventLog evt = new EventLog();
            if (EventLog.SourceExists(appName) == false)
            {
                EventLog.CreateEventSource(appName,"Application");
            }
            evt.Source = appName;
            evt.WriteEntry(message);
        }
    }
}